<head>
<link rel="stylesheet" type="text/css" href="../css/style.css" >
</head>
<?PHP
if(isset($_POST['type']) && $_POST['type']!="")
{
	if($_POST['type']=="short" && isset($_POST['sin']) && $_POST['sin'] != '')
	{
		/*
		$sou = exec('./bidwordRelevence '.$_POST['sin']);
		$sou = trim($sou);
		*/
		$p = array();
		$bin = decbin($_POST['sin']);
		$bin = str_pad($bin, 32, 0, STR_PAD_LEFT);
		$p[0] = bindec((int)substr($bin, 24, 8));	
		$p[1] = bindec((int)substr($bin, 16, 8));
		$p[2] = bindec((int)substr($bin, 8, 8));
		$p[3] = bindec((int)substr($bin, 0, 8));
	}
}
?>
<p class="pt" >
长尾词分数解析
</p>
<table width=90%>
<tr>
<th width=10% >Score</th>
<th width=20% >StaticScore</th>
<th width=20% >Noname</th>
<th width=20% >Noname</th>
<th width=20% >Noname</th>
</tr>
<tr>
<form action="parsescore.php" method="POST" ><td><input type="hidden" name="type" value="short" /><input style="width:100%" type=text id="sin" name="sin" onkeydown="this.submit();" /></td></form>
<?PHP
if(!isset($p))
{
	echo '<td></td><td></td><td></td><td></td>';
}
foreach($p as $ps)
{
	echo '<td align=center>';
	if($ps == null || $ps == "")
	{
		echo '0';
	}
	else
	{
		echo "$ps";
	}
	echo '</td>';
}
?>
</tr>
</table>
